package behavior.command;

/**
 * 遥控器，命令的发出者，发出者并不知道执行命令的是谁
 * 
 * @author thinkpad
 *
 */
public class RemoteControl {
	private Command onCommand, offCommand, changeChannel;

	public RemoteControl(Command on, Command off, Command channel) {
		onCommand = on;
		offCommand = off;
		changeChannel = channel;
	}

	public void turnOn() {
		onCommand.execute();
	}

	public void turnOff() {
		offCommand.execute();
	}

	public void changeChannel() {
		changeChannel.execute();
	}
}
